package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the MOTHER_TONGUE database table.
 * 
 */
@Entity
@Table(name="MOTHER_TONGUE")
@NamedQuery(name="MotherTongue.findAll", query="SELECT m FROM MotherTongue m")
public class MotherTongue implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="MOTHER_TONGUE_MOTHID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="MOTHER_TONGUE_MOTHID_GENERATOR")
	@Column(name="MOTH_ID")
	private long mothId;

	@Column(name="MOTH_CREATORDATE")
	private Timestamp mothCreatordate;

	@Column(name="MOTH_NAME")
	private String mothName;

	@Column(name="MOTH_PERSON")
	private String mothPerson;

	@Column(name="MOTH_UPDATEDATE")
	private Timestamp mothUpdatedate;

	//bi-directional many-to-one association to StaffInformation
	@OneToMany(mappedBy="motherTongue")
	@JSONField(serialize=false)
	private List<StaffInformation> staffInformations;

	public MotherTongue() {
	}

	public long getMothId() {
		return this.mothId;
	}

	public void setMothId(long mothId) {
		this.mothId = mothId;
	}

	public Timestamp getMothCreatordate() {
		return this.mothCreatordate;
	}

	public void setMothCreatordate(Timestamp mothCreatordate) {
		this.mothCreatordate = mothCreatordate;
	}

	public String getMothName() {
		return this.mothName;
	}

	public void setMothName(String mothName) {
		this.mothName = mothName;
	}

	public String getMothPerson() {
		return this.mothPerson;
	}

	public void setMothPerson(String mothPerson) {
		this.mothPerson = mothPerson;
	}

	public Timestamp getMothUpdatedate() {
		return this.mothUpdatedate;
	}

	public void setMothUpdatedate(Timestamp mothUpdatedate) {
		this.mothUpdatedate = mothUpdatedate;
	}

	public List<StaffInformation> getStaffInformations() {
		return this.staffInformations;
	}

	public void setStaffInformations(List<StaffInformation> staffInformations) {
		this.staffInformations = staffInformations;
	}

	public StaffInformation addStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().add(staffInformation);
		staffInformation.setMotherTongue(this);

		return staffInformation;
	}

	public StaffInformation removeStaffInformation(StaffInformation staffInformation) {
		getStaffInformations().remove(staffInformation);
		staffInformation.setMotherTongue(null);

		return staffInformation;
	}

}